home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / tool7v13 / demobio.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-09-25  |  5.1 KB  |  176 lines

  1. Program DemoBios;
  2.  
  3. { Purpose....... Demonstrates the use of the following units: Misc, Bios
  4.   Comments...... None
  5.   Author........ Thayne Breetzke
  6.   Date.......... 22 March 1994                                               }
  7.  
  8. Uses
  9.   Crt,
  10.   Cursor,
  11.   Screen,
  12.   Windows,
  13.   Misc,
  14.   Bios,
  15.   Strings,
  16.   Input;
  17.  
  18. Var
  19.   MHz,
  20.   KHz  : Word;
  21.   Key  : Char;
  22.  
  23.  
  24. Procedure ShowKeys;
  25.  
  26. Begin
  27.   If RShiftPressed then
  28.     Begin
  29.       WriteXY(40,16,'▄▄▄▄▄▄▄▄▄▄',15+7*16);
  30.       WriteXY(40,17,'▀▀▀▀▀▀▀▀▀▀',15+7*16);
  31.     end
  32.   else
  33.     Begin
  34.       WriteXY(40,16,'▄▄▄▄▄▄▄▄▄▄',112);
  35.       WriteXY(40,17,'▀▀▀▀▀▀▀▀▀▀',112);
  36.     end;
  37.   If LShiftPressed then
  38.     Begin
  39.       WriteXY(6,16,'▄▄▄▄▄▄▄▄▄',15+7*16);
  40.       WriteXY(6,17,'▀▀▀▀▀▀▀▀▀',15+7*16);
  41.     end
  42.   else
  43.     Begin
  44.       WriteXY(6,16,'▄▄▄▄▄▄▄▄▄',112);
  45.       WriteXY(6,17,'▀▀▀▀▀▀▀▀▀',112);
  46.     end;
  47.   If LCtrlPressed then
  48.     WriteXY(6,18,'████',15+7*16)
  49.   else
  50.     WriteXY(6,18,'████',112);
  51.   If RCtrlPressed then
  52.     WriteXY(46,18,'████',15+7*16)
  53.   else
  54.     WriteXY(46,18,'████',112);
  55.   If LAltPressed then
  56.     WriteXY(14,18,'████',15+7*16)
  57.   else
  58.     WriteXY(14,18,'████',112);
  59.   If RAltPressed then
  60.     WriteXY(38,18,'████',15+7*16)
  61.   else
  62.     WriteXY(38,18,'████',112);
  63.   If SysPressed then
  64.     Begin
  65.       WriteXY(54,10,'▄▄',15+7*16);
  66.       WriteXY(54,11,'▀▀',15+7*16);
  67.     end
  68.   else
  69.     Begin
  70.       WriteXY(54,10,'▄▄',112);
  71.       WriteXY(54,11,'▀▀',112);
  72.     end;
  73.   If ScrollLockPressed then
  74.     Begin
  75.       WriteXY(57,10,'▄▄',15+7*16);
  76.       WriteXY(57,11,'▀▀',15+7*16);
  77.     end
  78.   else
  79.     Begin
  80.       WriteXY(57,10,'▄▄',112);
  81.       WriteXY(57,11,'▀▀',112);
  82.     end;
  83.   If NumLockPressed then
  84.     WriteXY(65,12,'██',15+7*16)
  85.   else
  86.     WriteXY(65,12,'██',112);
  87.   If CapsPressed then
  88.     WriteXY(6,15,'████',15+7*16)
  89.   else
  90.     WriteXY(6,15,'████',112);
  91.   If InsertPressed then
  92.     WriteXY(54,12,'██',15+7*16)
  93.   else
  94.     WriteXY(54,12,'██',112);
  95.   If NumLockOn then
  96.     WriteXY(65,10,'▄▄',15+7*16)
  97.   else
  98.     WriteXY(65,10,'▄▄',112);
  99.   If CapsLockOn then
  100.     WriteXY(68,10,'▄▄',15+7*16)
  101.   else
  102.     WriteXY(68,10,'▄▄',112);
  103.   If ScrollLockOn then
  104.     WriteXY(71,10,'▄▄',15+7*16)
  105.   else
  106.     WriteXY(71,10,'▄▄',112);
  107.   If InsertOn then
  108.     WriteMem(6,20,'Insert On ')
  109.   else
  110.     WriteMem(6,20,'Insert Off');
  111. end;
  112.  
  113.  
  114. Begin
  115.   SetPrtScrOff;
  116.   SetPauseOff;
  117.   TextAttr := 7;
  118.   CursorOff;
  119.   ClearArea(1,1,80,25,7,'▒');
  120.   DrawBox(4,2,77,4,'','',DoubleFrame,15+1*16,14+1*16,True);
  121.   WriteMem(5,3,Center('The "Complete" Borland Turbo Pascal 6.0 Toolbox',72));
  122.   OpenWindow(12,7,69,23,'',' Press a key to continue ',SingleFrame,15+7*16,15+7*16,True);
  123.   WriteXY(14,9,Center('Print-Screen and Pause are set off',53),1+7*16);
  124.   If Length(CommandLine) > 37 then
  125.     WriteMem(14,11,'Command line:    '+Copy(CommandLine,1,34)+'...')
  126.   else
  127.     WriteMem(14,11,'Command line:    '+Copy(CommandLine,1,37));
  128.   WriteMem(14,12,'Computer type:');
  129.   Case CPUType of
  130.     1: WriteMem(31,12,'8086');
  131.     2: WriteMem(31,12,'80286');
  132.     3: WriteMem(31,12,'80386');
  133.     4: WriteMem(31,12,'80486');
  134.   end;
  135.   GetCPUSpeed(Mhz,Khz);
  136.   WriteMem(14,13,'Computer speed:  '+NumToStr(Mhz,0,0,False)+'Mhz, '+NumToStr(KHz,0,0,False)+'KHz');
  137.   WriteMem(14,14,'Hard disks:      '+NumToStr(NumHardDisks,0,0,False));
  138.   WriteMem(14,15,'Floppies:        '+NumToStr(NumFloppies,0,0,False));
  139.   WriteMem(14,16,'Active Floppy:');
  140.   Case ActiveFloppy of
  141.     0: WriteMem(31,16,'A:');
  142.     1: WriteMem(31,16,'B:');
  143.   end;
  144.   WriteMem(14,17,'Math co present: '+BoolToStr(MathCoPresent,'Yes/No'));
  145.   WriteMem(14,18,'DMA installed:   '+BoolToStr(DMAInstalled,'Yes/No'));
  146.   WriteMem(14,19,'Serial ports:    '+NumToStr(NumSerialPorts,0,0,False));
  147.   WriteMem(14,20,'Printer ports:   '+NumToStr(NumPrinterPorts,0,0,False));
  148.   WriteMem(14,21,'Game adapter:    '+BoolToStr(GameAdapterPresent,'Yes/No'));
  149.   WaitForKeypress;
  150.   CloseWindow;
  151.   DrawBox(4,9,77,22,'',' Press Ctrl,Alt,Shift,CapsLk,NumLk,ScrLk,SysReq,Ins (ESC exits) ',NoFrame,15+7*16,15+7*16,False);
  152.   WriteXY(6,10,'▄▄    ▄▄ ▄▄ ▄▄ ▄▄   ▄▄ ▄▄ ▄▄ ▄▄   ▄▄ ▄▄ ▄▄ ▄▄   ▄▄ ▄▄ ▄▄   ▄▄ ▄▄ ▄▄ ▄▄',112);
  153.   WriteXY(6,11,'▀▀    ▀▀ ▀▀ ▀▀ ▀▀   ▀▀ ▀▀ ▀▀ ▀▀   ▀▀ ▀▀ ▀▀ ▀▀   ▀▀ ▀▀ ▀▀              ',112);
  154.   WriteXY(6,12,'██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██    ██ ██ ██   ██ ██ ██ ██',112);
  155.   WriteXY(6,13,'▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄    ▄▄ ▄▄ ▄▄   ▄▄ ▄▄ ▄▄ ▄▄',112);
  156.   WriteXY(6,14,'▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ████    ▀▀ ▀▀ ▀▀   ▀▀ ▀▀ ▀▀ ██',112);
  157.   WriteXY(6,15,'████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████               ██ ██ ██ ██',112);
  158.   WriteXY(6,16,'▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄       ▄▄      ▄▄ ▄▄ ▄▄ ▄▄',112);
  159.   WriteXY(6,17,'▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀▀▀▀▀▀       ▀▀      ▀▀ ▀▀ ▀▀ ██',112);
  160.   WriteXY(6,18,'████    ████ ██████████████████ ████    ████    ██ ██ ██   █████ ██ ██',112);
  161.   WriteXY(74,10,'▄▄',15+7*16);
  162.   SetScrollLockOff;
  163.   SetCapsLockOff;
  164.   SetInsertOff;
  165.   SetNumLockOff;
  166.   Key := #0;
  167.   Repeat
  168.     ShowKeys;
  169.     If KeyPressed then
  170.       Key := ReadKey;
  171.   until Key = #27;
  172.   ClrScr;
  173.   CursorOn(False);
  174.   SetPrtScrOn;
  175.   SetPauseOn;
  176. end.